package com.UI
{
	import com.*;
	import com.Engine.*;
	import com.Packet.*;
	
	import flash.display.*;
	import flash.events.*;
	import flash.external.*;
	import flash.filters.*;
	import flash.geom.*;
	import flash.net.*;
	import flash.system.*;
	import flash.text.*;
	import flash.ui.*;
	import flash.utils.*;
	
	import gs.*;
	import gs.easing.*;
	import gs.events.TweenEvent;
	
	import org.aswing.*;
	import org.aswing.border.*;
	import org.aswing.border.EmptyBorder;
	import org.aswing.colorchooser.*;
	import org.aswing.dnd.*;
	import org.aswing.event.*;
	import org.aswing.ext.*;
	import org.aswing.geom.*;
	import org.aswing.plaf.*;
	import org.aswing.skinbuilder.SkinProgressBarBackground;
	import org.aswing.skinbuilder.SkinProgressBarForeground;
	public class PanelDateWest extends JPanel
	{
		//members define
		private var txtTrends:JTextArea;
		
		public function PanelDateWest()
		{
			//component creation
			setSize(new IntDimension(190, 422));
			setPreferredSize(new IntDimension(190, 422));
			var layout0:BoxLayout = new BoxLayout();
			layout0.setAxis(AsWingConstants.VERTICAL);
			layout0.setGap(0);
			setLayout(layout0);
			
			txtTrends = new JTextArea();
			txtTrends.setLocation(new IntPoint(0, 68));
			txtTrends.setSize(new IntDimension(180, 21));
			
			//component layoution
			append(txtTrends);
			//----------------------------------
			setImages();
			
		}
		public function setImages():void
		{
			setConstraints("West");
			
			var filter:GlowFilter;
			//var font:ASFont = new ASFont("宋体", 12, false, false, false, false);
			filter = new GlowFilter(0x000000, 1, 2, 2, 10);
			
			txtTrends.setForeground(new ASColor(0xf9d2db));
			txtTrends.setEditable(false);
			txtTrends.setWordWrap(true);
			txtTrends.scrollToBottomLeft();
			txtTrends.setFont(new ASFont("宋体", 12, false, false, false, false));
			
			txtTrends.filters = new Array(filter);
			
			txtTrends.setBackgroundDecorator(null);
			txtTrends.scrollToBottomLeft();
			
		}
		
		public function setData(object:Object):void
		{
			var objDateCSV:Object = Client.getInstance().GetDateCSV(object.m_nDateCSVId);

			txtTrends.setHtmlText("");
			if(object.m_nDateCharId == 0)
			{
				return;
			}
			
			var msg:String = new String;
			for(var i:int; i < object.m_nDateTrendsSize; i++)
			{
				if(object.m_arDateTrends == null)
					return;
				msg += object.m_arDateTrends[i] + '<br>';
				
			}
			txtTrends.setHtmlText(msg);
			//txtTrends.pack();
			txtTrends.scrollToBottomLeft();
			
		}
		private static var _instance:* = null;
		public static function getInstance():PanelDateWest
		{
			if(_instance == null)
				_instance = new PanelDateWest();
			return _instance;
		}
	}
}